<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>个人资料 - ${seo_title!}</title>
    <meta name="keywords" content="问答系统,java问答系统,开源之家问答系统 ,Laravel问答系统,社区问答系统" />
    <meta name="description" content="FlyCms问答系统社区交流平台" />
    <!-- Bootstrap -->
    <link href="/assets/js/vendors/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/assets/js/vendors/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link rel="stylesheet" media="screen" href="/assets/skin/pc_theme/defalut/css/index.css" />
    <link rel="stylesheet" media="screen" href="/assets/skin/pc_theme/defalut/css/global.css" />
    <link type="text/css" rel="stylesheet" href="/assets/js/vendors/cropper/cropper.min.css" />
    <link href="/assets/js/vendors/jHsDate/css/jHsDate.css" type="text/css" rel="stylesheet" />
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script type="text/javascript" src="/assets/skin/pc_theme/defalut/js/sea.js"></script>
    <script type="text/javascript" src="/assets/skin/pc_theme/defalut/js/sea.config.js"></script>
</head>
<body>
<#include "../common/header.html">

<div class="wrap">
    <div class="container">
        <div class="row">
            <!--左侧菜单-->
            <div id="secondary" class="col-md-2">
                <nav class="list-group mt-20">
                    <a href="/ucenter/account" class="list-group-item  active "><span class="glyphicon glyphicon-user"></span> 个人资料</a>
                    <a href="/ucenter/password" class="list-group-item "><span class="glyphicon glyphicon-pencil"></span> 修改密码</a>
                    <a href="/ucenter/safe_email" class="list-group-item"><span class="glyphicon glyphicon-envelope"></span> 绑定邮箱</a>
                    <a href="/ucenter/safe_mobile" class="list-group-item"><span class="glyphicon glyphicon-phone"></span> 绑定手机</a>
                    <a href="/ucenter/favorite" class="list-group-item "><span class="fa fa-graduation-cap" aria-hidden="true"></span>我的收藏</a>
                    <a href="/ucenter/invite" class="list-group-item "><span class="fa fa-bullhorn" aria-hidden="true"></span> 线上推广</a>
                    <a href="#" class="list-group-item "><span class="glyphicon glyphicon-retweet"></span> 账号绑定</a>
                    <a href="/ucenter/account_log" class="list-group-item "><span class="fa fa-database"></span> 金币管理</a>
                    <a href="/ucenter/message" class="list-group-item "><span class="glyphicon glyphicon-bell"></span> 通知提醒</a>
                </nav>
            </div>
            <div id="main" class="col-md-10 form-horizontal">
                <div class="settings">
                    <h2 class="h3 post-title">个人资料</h2>
                    <@fly_useractivation  userId="${user.userId!}"><#if status>
                    <div class="alert bg-danger" role="alert">
                        * 请填写下面的用户基本信息激活该账号!
                    </div>
                    </#if></@fly_useractivation>
                    <div class="row mt-30">

                        <div class="col-md-3 col-md-push-9 text-center">
                            <img class="avatar-128" id="user_avatar_image" src="<#if user.avatar??><@fly_avatar avatarurl=user.avatar avatar="avatar1"/><#else>/assets/skin/pc_theme/defalut/images/avatar/128x128.jpg</#if>" alt="头像">
                            <div class="wu-example mt-10">
                                <div class="change-avatar">
                                    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#avatar_modal">修改头像</button>
                                    <p class="text-muted mt-10">从电脑中选择图片上传, 图像大小不要超过 2 MB</p>
                                    <div class="modal fade" id="avatar_modal" tabindex="-1" role="dialog" aria-labelledby="avatar_model_label" data-backdrop="static" data-keyboard="false">
                                        <div class="modal-dialog">
                                            <div class="modal-content">
                                                <div class="modal-header">
                                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                                                    <h4 class="modal-title" id="avatar_model_label">修改头像</h4>
                                                </div>
                                                <div class="modal-body">
                                                    <div class="row">
                                                        <div class="col-xs-6 text-center">
                                                            <div id="avatar_origin" class="avatar-container">
                                                                <img class="avatar-origin" id="newAvatarImg" src="<#if user.avatar??><@fly_avatar avatarurl=user.avatar avatar="avatar1"/><#else>/assets/skin/pc_theme/defalut/images/avatar/128x128.jpg</#if>">
                                                            </div>
                                                            <!--用来存放文件信息-->
                                                            <div id="uploader">
                                                                <div id="fileList" class="uploader-list"></div>
                                                                <input type="file" class="hidden" id="newAvatarFile" name="newAvatarFile" accept="image/*" />
                                                                <button id="choiceAvatarBtn" class="btn btn-primary mt-20">选择图片</button>
                                                            </div>
                                                        </div>
                                                        <div class="col-xs-6 text-center mt-5">
                                                            <div class="preview-container img-preview">
                                                            </div>
                                                            <button id="confirmAvatarBtn" type="button" class="btn btn-primary">保存头像</button>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-8 col-md-pull-3">
                            <form name="baseForm" id="base_form" action="/ucenter/account_update" method="POST" onsubmit="return false;">
                                <input type="hidden" name="_token" value="">
                                <div class="form-group ">
                                    <label for="nickName" class="required control-label col-sm-3">昵称</label>
                                    <div class="col-sm-9">
                                        <input name="nickName" id="nickName" type="text" maxlength="32" placeholder="昵称/姓名" class="form-control" value="${user.nickName!}">
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label for="signature" class="required control-label col-sm-3">个性签名</label>
                                    <div class="col-sm-9">
                                        <input name="signature" id="signature" type="text" maxlength="50" placeholder="您的个性签名" class="form-control" value="${user.signature!}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-sm-3">性别</label>
                                    <div class="col-sm-9">
                                        <label class="radio-inline"><input name="sex" type="radio" value="1"<#if user.sex=1> checked="checked"</#if>> 男</label>
                                        <label class="radio-inline"><input name="sex" type="radio" value="2"<#if user.sex=2> checked="checked"</#if>> 女</label>
                                        <label class="radio-inline"><input name="sex" type="radio" value="3"<#if user.sex=3> checked="checked"</#if>> 保密</label>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="birthday" class="control-label col-sm-3">生日</label>
                                    <div class="col-sm-9">
                                        <input name="birthday" id="birthday" type="text" placeholder="格式 YYYY-MM-DD" value="<#if user.birthday??>${user.birthday?string('yyyy-MM-dd')}</#if>" class="form-control"  readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="province" class="control-label col-sm-3">所在城市</label>
                                    <div class="col-sm-4">
                                        <select class="form-control" name="province" id="province">
                                            <option value="0">请选择省份</option>

                                            <@fly_areaslist parentId=0>
                                            <#list areaslist as list>
                                            <option value="${list.areaId?c}"<#if user.province??><#if list.areaId=user.province> selected = "selected"</#if></#if>>${list.areaName!}</option>
                                            </#list>
                                            </@fly_areaslist>
                                        </select>
                                    </div>
                                    <div class="col-sm-5">
                                        <select class="form-control" name="city" id="city">
                                            <option value="0">请选择地区</option>
                                            <#if user.city??>
                                            <@fly_areaslist parentId="${user.province?c}">
                                            <#list areaslist as areas>
                                            <option value="${areas.areaId?c}"<#if areas.areaId=user.city> selected = "selected"</#if>>${areas.areaName!}</option>
                                            </#list>
                                            </@fly_areaslist>
                                            </#if>
                                            </select>
                                        </select>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="work" class="control-label col-sm-3">身份职业</label>
                                    <div class="col-sm-9">
                                        <input name="work" id="work" value="${user.work!}" type="text" maxlength="32" placeholder="例如：汽车制造，产品设计师，登山爱好者" class="form-control">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="setting-description" class="control-label col-sm-3">自我介绍</label>
                                    <div class="col-sm-9">
                                        <textarea name="description" id="setting-description" class="form-control mono" rows="6">${user.description!}</textarea>
                                    </div>
                                </div>
                                <div class="form-action mb-20">
                                    <div class="col-sm-offset-3 col-sm-9">
                                        <input type="hidden" name="userId" id="userId" value="${user.userId!}">
                                        <button class="btn btn-xl btn-primary profile-sub" type="submit">提交</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<#include "../common/footer.html">
<script type="text/javascript">seajs.use('account', function(account) {});</script>
<script type="text/javascript"> seajs.use('main', function(main){}); </script>
</body>
</html>